package com.springcloud.web;

import com.springcloud.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RestTestController {


    @GetMapping("/providerRestTest01")
    public String providerRestTest01(){
        return "这是提供者的RestTemplate测试01";
    }

    @GetMapping("/providerRestTest02")
    public User providerRestTest02(Integer userId){
        User user=new User();
        user.setUserId(userId);
        user.setUserName("张三");
        user.setAge(18);
        return user;

    }
}
